Crate floating_ui_dom

source ·
Expand description

Rust port of Floating UI.

This is the library to use Floating UI on the web, wrapping floating_ui_core with DOM interface logic.

See @floating-ui/dom for the original package.

Re-exports§

Structs§

Enums§

Constants§

Traits§

Functions§

  • Automatically updates the position of the floating element when necessary. Should only be called when the floating element is mounted on the DOM or visible on the screen.
  • Computes the x and y coordinates that will place the floating element next to a given reference element.

Type Aliases§

  • Provides data to position an inner element of the floating element so that it appears centered to the reference element.
  • Optimizes the visibility of the floating element by choosing the placement that has the most space available automatically, without needing to specify a preferred placement. Alternative to Flip.
  • Optimizes the visibility of the floating element by flipping the placement in order to keep it in view when the preferred placement(s) will overflow the clipping boundary. Alternative to AutoPlacement.
  • Provides data to hide the floating element in applicable situations, such as when it is not in the same clipping context as the reference element.
  • Provides improved positioning for inline reference elements that can span over multiple lines, such as hyperlinks or range selections.
  • Vector of middleware used in ComputePositionConfig.
  • Modifies the placement by translating the floating element along the specified axes.
  • Optimizes the visibility of the floating element by shifting it in order to keep it in view when it will overflow the clipping boundary.
  • Provides data that allows you to change the size of the floating element - for instance, prevent it from overflowing the clipping boundary or match the width of the reference element.